class Solution {
public:
    string maximumOddBinaryNumber(string s) {
        int cnt = 0;
        int n = s.size();
        for (auto x : s) {
            cnt += x == '1' ? 1 : 0;
        }
        string ans;
        for (int i = 0; i < cnt - 1; i++)ans += "1";
        n -= cnt;
        while (n--) {
            ans += "0";
        }
        ans += "1";
        return ans;
    }
};